package com.cn.kabalifeuser.ui.my.activity;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.cn.kabalifeuser.R;
import com.cn.kabalifeuser.base.IBaseActivity;
import com.cn.kabalifeuser.config.LoginHelper;
import com.cn.kabalifeuser.utils.RxToast;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by 晓林 on 2020/9/10.
 * function: 我的账户
 */
public class MyAccountActivity extends IBaseActivity<MyAccountView, MyAccountPresenter> implements MyAccountView {
    @BindView(R.id.tv_user_vip_name)
    TextView tvUserVipName;
    @BindView(R.id.tv_up_phone)
    TextView tvUpPhone;
    @BindView(R.id.tv_zfb)
    TextView tvZfb;

    @Override
    protected MyAccountPresenter createPresenter() {
        return new MyAccountPresenter();
    }

    @Override
    protected int provideContentViewId() {
        return R.layout.activity_my_account;
    }

    @Override
    public void onReLoggedIn(String msg) {
        RxToast.error(msg);
        LoginHelper.againGoToLoginActivity(getMe());
    }

    @Override
    public void onError(String msg) {
        RxToast.error(msg);
    }

    @Override
    public Context _getContext() {
        return getMe();
    }

    @Override
    public void initView(Bundle savedInstanceState) {
        super.initView(savedInstanceState);

        setTitleBar("我的账户");
    }

    @OnClick({R.id.ll_btn_user_vip_name, R.id.ll_btn_up_phone, R.id.ll_btn_login_phone, R.id.ll_btn_set, R.id.ll_btn_zfb})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.ll_btn_user_vip_name:
                //会员名
                break;
            case R.id.ll_btn_up_phone:
                //修改手机号码
                break;
            case R.id.ll_btn_login_phone:
                //修改登录好吗
                break;
            case R.id.ll_btn_set:
                //更多安全设置
                break;
            case R.id.ll_btn_zfb:
                //支付宝账户
                break;
        }
    }
}
